/*
********************************************************************************
* Copyright (C) 2022, xiang.D <dx_65535@163.com>.
* All right reserved.
*
* File Name   : caretaker.h
* Author      :
* Version     : V1.0
* Description :
* Journal     : 2022-03-04 version v1.0
* Brief       : Blog: https://blog.csdn.net/qq_38750572?spm=1001.2014.3001.5343
* Others      :
                Compile command: make
********************************************************************************
*/
#ifndef __CARETAKER_H__
#define __CARETAKER_H__

#include <vector>
#include "originator.h"

class CCaretaker
{
public:
    explicit CCaretaker(COriginator *pOri);

    ~CCaretaker();

    void Backup();

    void Undo();

private:
    COriginator *pmOriginator;
    std::vector<CMemento*> mMementoArray;
};

#endif